3.137 \(\int \frac{a+b \tan ^{-1}(\frac{c}{x})}{x^2} \, dx\)

Optimal. Leaf size=34 \[ \frac{b \log \left (\frac{c^2}{x^2}+1\right )}{2 c}-\frac{a+b \tan ^{-1}\left (\frac{c}{x}\right )}{x} \]

[Out]

-((a + b*ArcTan[c/x])/x) + (b*Log[1 + c^2/x^2])/(2*c)

________________________________________________________________________________________

Rubi [A]  time = 0.0190498, antiderivative size = 34, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {5033, 260} \[ \frac{b \log \left (\frac{c^2}{x^2}+1\right )}{2 c}-\frac{a+b \tan ^{-1}\left (\frac{c}{x}\right )}{x} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTan[c/x])/x^2,x]

[Out]

-((a + b*ArcTan[c/x])/x) + (b*Log[1 + c^2/x^2])/(2*c)

Rule 5033

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTan
[c*x^n]))/(d*(m + 1)), x] - Dist[(b*c*n)/(d*(m + 1)), Int[(x^(n - 1)*(d*x)^(m + 1))/(1 + c^2*x^(2*n)), x], x]
/; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \frac{a+b \tan ^{-1}\left (\frac{c}{x}\right )}{x^2} \, dx &=-\frac{a+b \tan ^{-1}\left (\frac{c}{x}\right )}{x}-(b c) \int \frac{1}{\left (1+\frac{c^2}{x^2}\right ) x^3} \, dx\\ &=-\frac{a+b \tan ^{-1}\left (\frac{c}{x}\right )}{x}+\frac{b \log \left (1+\frac{c^2}{x^2}\right )}{2 c}\\ \end{align*}

Mathematica [A]  time = 0.0080562, size = 37, normalized size = 1.09 \[ -\frac{a}{x}+\frac{b \log \left (\frac{c^2}{x^2}+1\right )}{2 c}-\frac{b \tan ^{-1}\left (\frac{c}{x}\right )}{x} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*ArcTan[c/x])/x^2,x]

[Out]

-(a/x) - (b*ArcTan[c/x])/x + (b*Log[1 + c^2/x^2])/(2*c)

________________________________________________________________________________________

Maple [A]  time = 0.021, size = 36, normalized size = 1.1 \begin{align*} -{\frac{a}{x}}-{\frac{b}{x}\arctan \left ({\frac{c}{x}} \right ) }+{\frac{b}{2\,c}\ln \left ( 1+{\frac{{c}^{2}}{{x}^{2}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctan(c/x))/x^2,x)

[Out]

-a/x-b/x*arctan(c/x)+1/2*b*ln(1+c^2/x^2)/c

________________________________________________________________________________________

Maxima [A]  time = 1.02608, size = 51, normalized size = 1.5 \begin{align*} -\frac{b{\left (\frac{2 \, c \arctan \left (\frac{c}{x}\right )}{x} - \log \left (\frac{c^{2}}{x^{2}} + 1\right )\right )}}{2 \, c} - \frac{a}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c/x))/x^2,x, algorithm="maxima")

[Out]

-1/2*b*(2*c*arctan(c/x)/x - log(c^2/x^2 + 1))/c - a/x

________________________________________________________________________________________

Fricas [A]  time = 2.22687, size = 103, normalized size = 3.03 \begin{align*} -\frac{2 \, b c \arctan \left (\frac{c}{x}\right ) - b x \log \left (c^{2} + x^{2}\right ) + 2 \, b x \log \left (x\right ) + 2 \, a c}{2 \, c x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c/x))/x^2,x, algorithm="fricas")

[Out]

-1/2*(2*b*c*arctan(c/x) - b*x*log(c^2 + x^2) + 2*b*x*log(x) + 2*a*c)/(c*x)

________________________________________________________________________________________

Sympy [A]  time = 0.976839, size = 36, normalized size = 1.06 \begin{align*} \begin{cases} - \frac{a}{x} - \frac{b \operatorname{atan}{\left (\frac{c}{x} \right )}}{x} - \frac{b \log{\left (x \right )}}{c} + \frac{b \log{\left (c^{2} + x^{2} \right )}}{2 c} & \text{for}\: c \neq 0 \\- \frac{a}{x} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atan(c/x))/x**2,x)

[Out]

Piecewise((-a/x - b*atan(c/x)/x - b*log(x)/c + b*log(c**2 + x**2)/(2*c), Ne(c, 0)), (-a/x, True))

________________________________________________________________________________________

Giac [A]  time = 1.11594, size = 54, normalized size = 1.59 \begin{align*} -\frac{b{\left (\frac{2 \, c \arctan \left (\frac{c}{x}\right )}{x} - \log \left (\frac{c^{2}}{x^{2}} + 1\right )\right )} + \frac{2 \, a c}{x}}{2 \, c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c/x))/x^2,x, algorithm="giac")

[Out]

-1/2*(b*(2*c*arctan(c/x)/x - log(c^2/x^2 + 1)) + 2*a*c/x)/c